<!--
**********************************************************
* @Author: 张小平
* @Date:   2024-05-01
* @Email:  qqshuqian@163.com
* @Last modified: 最后修改日期
* @Description: 文件描述
**********************************************************
-->
<template>
  <div class="node-box" :class="{'start-node': isStart}">
    <slot />
  </div>
</template>

<script>
export default {
  props: {
    isStart: {
      type: Boolean,
      default: false
    }
  }
}
</script>

<style lang="scss" scoped>
@mixin layCenter {
  display: flex;
  align-items: center;
  justify-content: center;
}
.node-box {
  width: 100%;
  @include layCenter;
  flex-flow: column nowrap;
  position: relative;
  box-sizing: border-box;
  padding: 0 50px;
}
.node-box:before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    width: 0;
    height: 4px;
    border-style: solid;
    border-width: 6px 6px 4px;
    border-color: #CACACA transparent transparent;
    background: #f0f2f5;
}
.start-node:before {
  content: none
}
</style>
